<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>
BaseModel class
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../resources/stylesheet.css" TITLE="Style">
</HEAD>

<BODY BGCOLOR="white">


<!-- ========= START OF TOP NAVBAR ======= -->

<table border="0" width="100%">
<tr>
<td width="50%">
<p align="left">
<a href="http://mvvmbasics.mobilemotion.eu/" target="_blank" title="MVVMbasics Homepage"><img src="../../resources/logo_mvvmbasics.png" alt="MVVMbasics Logo" border="0"></a>
</p>
</td>
<td width="50%">
<p align="right">
<a href="http://www.mobilemotion.eu/" target="_blank" title="mobilemotion.eu Homepage"><img src="../../resources/logo_mobilemotion.png" alt="mobilemotion.eu Logo" border="0"></a>
</p>
</td>
</tr>
</table>

<HR>

<p><a href="../../index.htm" title="MVVMbasics Class Reference Homepage">Back to Class Reference home page</a></p>

<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">MVVMbasics.Models</FONT>
<BR>
Class BaseModel
</H2>

<CODE>
<A HREF="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged%28v=vs.110%29.aspx" target="_blank" title="System.ComponentModel.INotifyPropertyChanged">System.ComponentModel.INotifyPropertyChanged</A>
<br>
&nbsp;&nbsp;<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>MVVMbasics.Models.BaseModel</B>
<br>&nbsp;
</CODE>
<HR>
<CODE>
&nbsp;<br>
public abstract class <B>BaseModel</B> : <A HREF="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged%28v=vs.110%29.aspx" target="_blank" title="System.ComponentModel.INotifyPropertyChanged">INotifyPropertyChanged</A>
</CODE>

<P>
Basic data model, not to be implemented directly, but to be inherited by the actual data models. Contains convenience functions that allow the implementation of <A HREF="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged%28v=vs.110%29.aspx" target="_blank" title="System.ComponentModel.INotifyPropertyChanged">INotifyPropertyChanged</A> and some command's <code>CanExecuteChanged</code> events in code snippets as short as possible.
</P>

<hr>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>public&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>BaseModel</B>()</CODE>
<BR>
<span class="Indented">Empty constructor.</span>
</TD>
</TR>
</TABLE>
&nbsp;

<!-- ======== EVENT SUMMARY ======== -->

<A NAME="event_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Event Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>public event <A HREF="http://msdn.microsoft.com/en-us/library/system.componentmodel.propertychangedeventhandler%28v=vs.110%29.aspx" target="_blank" title="System.ComponentModel.PropertyChangedEventHandler">PropertyChangedEventHandler</A>&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>PropertyChanged</B></CODE>
</TD>
</TR>
</TABLE>
&nbsp;

<!-- ======== METHOD SUMMARY ======== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<A NAME="Set(T)(field,value,propertyName)"><!-- --></A>
<CODE><B>Set&lt;T&gt;</B>(ref T field, T value, [<a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callermembernameattribute%28v=vs.110%29.aspx" target="_blank" title="CallerMemberNameAttribute Class">CallerMemberName</a>] string propertyName = "")</CODE>
<BR>
<span class="Indented">Setter method that sets the private member field and fires the <code>PropertyChanged</code> event.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>Set&lt;T&gt;</B>(<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;bool&gt;&gt; before, ref T field, T value, [<a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callermembernameattribute%28v=vs.110%29.aspx" target="_blank" title="CallerMemberNameAttribute Class">CallerMemberName</a>] string propertyName = "")</CODE>
<BR>
<span class="Indented">Setter method that sets the private member field, fires the <code>PropertyChanged</code> event and calls a specified method to decide whether to continue updating the member field.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<A NAME="Set(T)(field,value,after,propertyName)"><!-- --></A>
<CODE><B>Set&lt;T&gt;</B>(ref T field, T value, <A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A> after, [<a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callermembernameattribute%28v=vs.110%29.aspx" target="_blank" title="CallerMemberNameAttribute Class">CallerMemberName</a>] string propertyName = "")</CODE>
<BR>
<span class="Indented">Setter method that sets the private member field, fires the <code>PropertyChanged</code> event and calls a specified method after updating the member field.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>Set&lt;T&gt;</B>(<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;bool&gt;&gt; before, ref T field, T value, <A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A> after, [<a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callermembernameattribute%28v=vs.110%29.aspx" target="_blank" title="CallerMemberNameAttribute Class">CallerMemberName</a>] string propertyName = "")</CODE>
<BR>
<span class="Indented">Setter method that sets the private member field, fires the <code>PropertyChanged</code> event and calls two specified methods: One before updating the member field to decide whether to continue, one after updating the member field.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>NotifyPropertyChanged</B>(<a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.propertychangedeventargs%28v=vs.110%29.aspx" target="_blank" title="System.ComponentModel.PropertyChangedEventArgs">PropertyChangedEventArgs</a> args)</CODE>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>NotifyPropertyChanged</B>(string propertyName)</CODE>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>NotifyPropertyChanged</B>(<a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;T&gt;&gt; property)</CODE>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <a href="../Commands/BaseCommand.htm" title="MVVMbasics.Commands.BaseCommand">BaseCommand</a>&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>CreateCommand</B>(<A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A> execute)</CODE>
<BR>
<span class="Indented">Creates a Command and registers a parameterless method to it.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <a href="../Commands/BaseCommand.htm" title="MVVMbasics.Commands.BaseCommand">BaseCommand</a>&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>CreateCommand</B>(<A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A>&lt;object&gt; execute)</CODE>
<BR>
<span class="Indented">Creates a Command and registers a method with one parameter of type <code>object</code> to it.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <a href="../Commands/BaseCommand.htm" title="MVVMbasics.Commands.BaseCommand">BaseCommand</a>&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>CreateCommand</B>(<A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A> execute, <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;bool&gt;&gt; canExecute, params <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;object&gt;&gt;[] dependsOnProperties)</CODE>
<BR>
<span class="Indented">Creates a Command with a <code>CanExecute</code> condition and registers a parameterless method to it.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <a href="../Commands/BaseCommand.htm" title="MVVMbasics.Commands.BaseCommand">BaseCommand</a>&nbsp;</CODE></FONT></TD>
<TD>
<CODE><B>CreateCommand</B>(<A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A>&lt;object&gt; execute, <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;object, bool&gt;&gt; canExecute, params <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;object&gt;&gt;[] dependsOnProperties)</CODE>
<BR>
<span class="Indented">Creates a Command with a <code>CanExecute</code> condition and registers a method with one parameter of type <code>object</code> to it.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><S><B>Set&lt;T&gt;</B>(ref T field, T value, <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;T&gt;&gt; property, params <a href="../Commands/BaseCommand.htm" title="BaseCommand">BaseCommand</a>[] commands)</S></CODE>
<BR>
<span class="Indented">Setter method that sets the private member field, fires the <code>PropertyChanged</code> event and optionally fires one or multiple commands' <code>CanExecuteChanged</code> events.</span>
<BR>
<span class="Obsolete">Deprecated. Use method <code><a href="#Set(T)(field,value,propertyName)">Set<T>(ref T field, T value)</a></code> instead.</span>
</TD>
</TR>

<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void&nbsp;</CODE></FONT></TD>
<TD>
<CODE><S><B>Set&lt;T&gt;</B>(ref T field, T value, <a href="http://msdn.microsoft.com/en-us/library/bb335710%28v=vs.110%29.aspx" target="_blank" title="System.Linq.Expressions.Expression<TDelegate>">Expression</a>&lt;<a href="http://msdn.microsoft.com/en-us/library/bb534960%28v=vs.110%29.aspx" target="_blank" title="System.Func<TResult>">Func</a>&lt;T&gt;&gt; property, <A HREF="http://msdn.microsoft.com/en-us/library/system.action%28v=vs.110%29.aspx" target="_blank" title="System.Action">Action</A> method, params <a href="../Commands/BaseCommand.htm" title="BaseCommand">BaseCommand</a>[] commands)</S></CODE>
<BR>
<span class="Indented">Setter method that sets the private member field, fires the <code>PropertyChanged</code> event, calls a specified method after updating the member field, and optionally fires one or multiple commands' <code>CanExecuteChanged</code> events.</span>
<BR>
<span class="Obsolete">Deprecated. Use method <code><a href="#Set(T)(field,value,after,propertyName)">Set<T>(ref T field, T value, Action after)</a></code> instead.</span>
</TD>
</TR>
</TABLE>
&nbsp;

<!-- ========= END OF CLASS DATA ========= -->
<HR>

</body>
</HTML>